﻿
namespace Marmat.Forms.Views
{
    namespace Grid
    {
        public class BeforeShowContextMenuEventArgs : GridEventArgs
        {
            internal BeforeShowContextMenuEventArgs(BaseGrid Grid) : base(Grid)
            {
            }

            public System.Windows.Forms.ContextMenuStrip ContextMenu
            {
                get
                {
                    return this._ContextMenu;
                }

                set
                {
                    this._ContextMenu = value;
                }
            }

            private System.Windows.Forms.ContextMenuStrip _ContextMenu;

            public HitTypeEnum HitType
            {
                get
                {
                    return this._HitType;
                }
            }

            internal HitTypeEnum _HitType;

            public bool Cancel { get; set; }
        }

        public enum HitTypeEnum
        {
            /// <summary>
            /// 右击区域是选定的某一列
            /// </summary>
            /// <remarks></remarks>
            Column = 0,

            /// <summary>
            /// 右击区域是选定的某一行
            /// </summary>
            /// <remarks></remarks>
            Row = 1,

            /// <summary>
            /// 右击区域是选定的某一单元格
            /// </summary>
            /// <remarks></remarks>
            Cell = 2,

            /// <summary>
            /// 右击区域是选定的多个单元格
            /// </summary>
            /// <remarks></remarks>
            Range = 3,

            /// <summary>
            /// 右击区域是空白区
            /// </summary>
            /// <remarks></remarks>
            Empty = 4
        }
    }
}